from django.urls import path
from rest_framework_jwt.views import obtain_jwt_token

from .views import *
from rest_framework import routers
urlpatterns = [
    # 部门信息  查看 添加 修改  DepartmentView
    path('department1/', Department_Lis_Add_APIView.as_view()),
    # 修改 部门信息
    # path('department/', Department_UP_DEL_APIView.as_view()),

    # 职责   查看 添加   DutyView
    # path('duty/', DutyAPIView.as_view()),

    # 员工
    # path('staff/', StaffAPIView.as_view()),

    # 管理员登录验证
    path('login/', obtain_jwt_token),

    # TODO day 5
    # 自定义的登录接口
    path('logincount/', LogincountView.as_view()),
    # 短信验证码sms_code
    path('sms_code/', SmsView.as_view()),
    # 验证短信验证码 phone_verify
    path('phone_verify/', CheckSmsView.as_view()),

    # TODO day 6
    # 统计总人数 total_count/
    path('total_count/', CountUserView.as_view()),
    # 统计日增人数 day_increment/
    path('day_increment/', DayAddUserView.as_view()),
    # 统计日活 day_live/
    path('day_live/', DayLiveUserView.as_view()),





    # # 登录账号
    # path('loginn/', LoginView.as_view()),
]
router = routers.DefaultRouter()
# TODO day 17
# 权限
router.register("permission", PermissionViewSet)
# 权限类型
router.register("permission_types", PermissionTypeViewSet)
# router.register("staff", StaffAPIView)

# TODO day 7
# 用户管理视图集
router.register("users", UserInfoViewSet)
urlpatterns += router.urls